package goleetcode

func findPeaks(mountain []int) []int {
	res := make([]int, 0)
	for i := 1; i <= len(mountain) - 2; i++ {
		if mountain[i] > mountain[i - 1] && mountain[i] > mountain[i + 1] {
			res = append(res, i)
		}
	}
	return res
}